#----------------------------------------
# Programs and libraries we want to build
#----------------------------------------

lib_LTLIBRARIES = libcompta.la

bin_PROGRAMS    = compta 
bin_PROGRAMS   += compta_version

#----------------------------
# SOURCES we want distributed
#----------------------------
libcompta_la_SOURCES = 

# date
libcompta_la_SOURCES += date/src/date.cpp

# money
libcompta_la_SOURCES += money/src/money.cpp

#forecast
libcompta_la_SOURCES += forecast/src/forecast.cpp
libcompta_la_SOURCES += forecast/src/operation.cpp

#utilities
libcompta_la_SOURCES += utilities/src/date_utils.cpp
libcompta_la_SOURCES += utilities/src/string_utils.cpp
libcompta_la_SOURCES += utilities/src/static_error_variables.cpp
libcompta_la_SOURCES += utilities/src/compta_help.cpp
libcompta_la_SOURCES += utilities/src/compta_version.cpp

# accounts
libcompta_la_SOURCES += accounts/src/account_base.cpp
libcompta_la_SOURCES += accounts/src/bank.cpp
libcompta_la_SOURCES += accounts/src/cash.cpp
libcompta_la_SOURCES += accounts/src/compta_obj.cpp
libcompta_la_SOURCES += accounts/src/history.cpp
libcompta_la_SOURCES += accounts/src/posting.cpp

# month report
libcompta_la_SOURCES += report/src/category_report.cpp
libcompta_la_SOURCES += report/src/monthly_report.cpp

# latex
libcompta_la_SOURCES += tex/src/latex_factory.cpp

# parsing
libcompta_la_SOURCES += parsing/src/parsing_def.cpp
libcompta_la_SOURCES += parsing/src/read_compta_input_file.cpp

# options
libcompta_la_SOURCES += options/src/compta_options.cpp

#----------------------------
# INCLUDES we want distributed
#----------------------------
pkginclude_HEADERS  =

# date
pkginclude_HEADERS += date/include/compta/date.hpp

# money
pkginclude_HEADERS += money/include/compta/money.hpp
pkginclude_HEADERS += money/include/compta/money_enum.hpp

# forecast
pkginclude_HEADERS += forecast/include/compta/operation.hpp
pkginclude_HEADERS += forecast/include/compta/forecast_container.hpp
pkginclude_HEADERS += forecast/include/compta/forecast.hpp

# utilities
pkginclude_HEADERS += utilities/include/compta/compta_exceptions.hpp
pkginclude_HEADERS += utilities/include/compta/compta_asserts.hpp
pkginclude_HEADERS += utilities/include/compta/static_error_variables.hpp
pkginclude_HEADERS += utilities/include/compta/date_utils.hpp
pkginclude_HEADERS += utilities/include/compta/string_utils.hpp
pkginclude_HEADERS += utilities/include/compta/compta_help.hpp

# accounts
pkginclude_HEADERS += accounts/include/compta/posting.hpp
pkginclude_HEADERS += accounts/include/compta/posting_enum.hpp
pkginclude_HEADERS += accounts/include/compta/history.hpp
pkginclude_HEADERS += accounts/include/compta/account_base.hpp
pkginclude_HEADERS += accounts/include/compta/cash.hpp
pkginclude_HEADERS += accounts/include/compta/savings.hpp
pkginclude_HEADERS += accounts/include/compta/bank.hpp
pkginclude_HEADERS += accounts/include/compta/compta_obj.hpp

# month reports
pkginclude_HEADERS += report/include/compta/monthly_report.hpp
pkginclude_HEADERS += report/include/compta/category_report.hpp

# latex
pkginclude_HEADERS += tex/include/compta/latex_factory.hpp
# options
pkginclude_HEADERS += options/include/compta/compta_options.hpp
pkginclude_HEADERS += options/include/compta/options_enum.hpp

# parsing
pkginclude_HEADERS += parsing/include/compta/parsing_def.hpp
pkginclude_HEADERS += parsing/include/compta/read_compta_input_file.hpp


# Needs to be builddir since this is generated by configure
pkginclude_HEADERS += $(top_builddir)/src/utilities/include/compta/compta_version.hpp

# Prog app
compta_version_SOURCES = apps/version.cpp
compta_version_LDADD = libcompta.la

compta_SOURCES = apps/main.cpp
compta_LDADD = libcompta.la

#--------------------------------------
#Local Directories to include for build
#--------------------------------------
AM_CPPFLAGS  =
AM_CPPFLAGS += -I$(top_srcdir)/src/date/include
AM_CPPFLAGS += -I$(top_srcdir)/src/money/include
AM_CPPFLAGS += -I$(top_srcdir)/src/forecast/include
AM_CPPFLAGS += -I$(top_srcdir)/src/accounts/include
AM_CPPFLAGS += -I$(top_srcdir)/src/stock/include
AM_CPPFLAGS += -I$(top_srcdir)/src/utilities/include
AM_CPPFLAGS += -I$(top_srcdir)/src/parsing/include
AM_CPPFLAGS += -I$(top_srcdir)/src/report/include
AM_CPPFLAGS += -I$(top_srcdir)/src/tex/include
AM_CPPFLAGS += -I$(top_srcdir)/src/options/include
AM_CPPFLAGS += -I$(top_builddir)/src/utilities/include #compta_version.h

CLEANFILES = 

#--------------
# Code coverage
#--------------
if CODE_COVERAGE_ENABLED
  CLEANFILES += *.gcda *.gcno
endif

EXTRA_DIST = common

